package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;

import java.io.Serializable;

/**
 * <p>
 * 手机号和分机号绑定表
 * </p>
 *
 * @author lijun
 * @since 2019-11-07
 */
@TableName("tt_bind")
public class BindPO extends DMSBasePO<BindPO> {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * appId
     */
    @TableField("app_id")
    private String appId;

    /**
     * 员工姓名
     */
    @TableField("employee_name")
    private String employeeName;

    /**
     * 员工编号
     */
    @TableField("employee_no")
    private String employeeNo;

    /**
     * 被叫显号
     */
    @TableField("show_number")
    private String showNumber;

    /**
     * 手机号
     */
    @TableField("mobile")
    private String mobile;

    /**
     * 总机号
     */
    @TableField("parent_number")
    private String parentNumber;

    /**
     * 分机号
     */
    @TableField("extension")
    private String extension;

    /**
     * 拉取通话记录页数
     */
    @TableField("page_num")
    private Integer pageNum;

    /**
     * 拉取通话记录分页大小
     */
    @TableField("page_size")
    private Integer pageSize;

    /**
     * 数据来源
     */
    @TableField("source")
    private String source;

    /**
     * 逻辑删除标示：是否删除
     */
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Integer isDeleted;

    public BindPO() {
        super();
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getEmployeeName() {
        return employeeName;
    }

    public void setEmployeeName(String employeeName) {
        this.employeeName = employeeName;
    }

    public String getEmployeeNo() {
        return employeeNo;
    }

    public void setEmployeeNo(String employeeNo) {
        this.employeeNo = employeeNo;
    }

    public String getShowNumber() {
        return showNumber;
    }

    public void setShowNumber(String showNumber) {
        this.showNumber = showNumber;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getParentNumber() {
        return parentNumber;
    }

    public void setParentNumber(String parentNumber) {
        this.parentNumber = parentNumber;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Override
    public Integer getIsDeleted() {
        return isDeleted;
    }

    @Override
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "BindPO{" +
                "id=" + id +
                ", appId=" + appId +
                ", employeeName=" + employeeName +
                ", employeeNo=" + employeeNo +
                ", showNumber=" + showNumber +
                ", mobile=" + mobile +
                ", parentNumber=" + parentNumber +
                ", extension=" + extension +
                ", pageNum=" + pageNum +
                ", pageSize=" + pageSize +
                ", source=" + source +
                ", isDeleted=" + isDeleted +
                "}";
    }

    /**
     * 将PO 信息转化为DTO
     *
     * @param dtoClass 需要进行转换的dtoClass
     * @author lijun
     * @since 2018/7/22 0022
     */
    public <T extends BaseDTO> T transPoToDto(Class<T> dtoClass) {
        return super.transDtoToPo(dtoClass);
    }

    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author lijun
     * @since 2018/7/22 0022
     */
    public <T extends BaseDTO> void transPoToDto(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "id");
    }

}
